Component({
  data: {
    selected: 0,
    color: "#8a8a8a",
    selectedColor: "#1296db",
    list: [{
      pagePath: "/pages/index/index/index",
      iconPath: "/images/home.png",
      selectedIconPath: "/images/home_select.png",
      text: "首页"
    }, {
      pagePath: "/pages/database/index/index",
      iconPath: "/images/database.png",
      selectedIconPath: "/images/database_select.png",
      text: "资料库"
    }]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      console.log("===============111111")
      console.log(e)
      const data = e.currentTarget.dataset
      const url = data.path
      console.log(url)
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
    }
  }
})